package com.jeff.transaction

import javax.annotation.*

import org.apache.commons.logging.Log
import org.apache.commons.logging.LogFactory
import org.springframework.beans.factory.annotation.*

import com.jeff.BookService


class CreditService {

    static transactional = true
	
	private static final Log log = LogFactory.getLog(this)
	
//	@Autowired
//	CreditNakedBLServiceInJava creditNakedBLServiceInJava
	
	ICreditBLService creditBLService 
//	@Autowired
//	void setCreditBLService(ICreditBLService creditBLService) {
//		this.creditBLService = creditBLService
//	}

	CreditSidekickService creditSidekickService
	
//	BookService bookService
	
    def updateCredit(Credit credit, params) {
		log.info("an INFO log has been logged at Credit Service")
		log.debug("an DEBUG log has been logged at Credit Service")
		log.error("an TRACE log will not be logged at Credit Service")
		println "Oh My God, CreditService service called!"
//		creditNakedBLServiceInJava.callJavaBLService()
		creditBLService.callJavaBLService()
		creditSidekickService.callBLService()
//		bookService.serviceMethod()
    }
}
